<%@ Page Language="C#" MasterPageFile="MasterPage.master" 
	AutoEventWireup="true" Title="Untitled Page" CodeFile="./Controller/Oefeningen_maken.aspx.cs" Inherits="Oefeningen_maken" Theme="SkinFile" %>
	

	<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

        <script language="JavaScript" type="text/javascript">
	    setTimeout("beginAftellen();",1000);
	</script>
        <table style="width:100%;">
            <tr>
                <td class="style4">
                    Leerling: <%=User.Identity.Name %>
                </td>
                <td class="style5">
                    Klas: <%=webappdotnet.Queries.getKlas(User.Identity.Name) %>
                </td>
                <td class="style3">
                    Vooruitgang: <%=getTotaal()-getVooruitgang() +"/"+getTotaal()%></td>
            </tr>
            <tr>
                <td colspan="3" class="style2">
                    

                    Resterende tijd:
                    <input id="afteller" type="text" readonly="true"/></td>      
            </tr>
            <tr>
                <td class="style4">
                    &nbsp;</td>
                <td class="style5">
                </td>
                <td class="style3">
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <asp:DataList ID="DataList1" runat="server" 
                        DataSourceID="SqlDataSource1">
                        <ItemTemplate>
                            &nbsp;<asp:Label ID="opgaveTekstLabel" runat="server" 
                                Text='<%# Eval("opgaveTekst") %>' />
                            <br />
                            <br />
                        </ItemTemplate>
                    </asp:DataList>
                </td>
                <td class="style6" colspan="2">
                    <asp:TextBox ID="TextBox1" runat="server" Width="190px"></asp:TextBox>
                    <asp:Button ID="Button1" runat="server" onclick="Button1_Click1" Text="Klaar" />
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style1">
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:test %>" 
                        
                        
                        SelectCommand="SELECT TOP (1) opgaveTekst FROM OpdrachtDetail WHERE (opdrachtID = @opID) AND (opdrachtDetailID NOT IN (SELECT opdrachtDetailID FROM LeerlingOpdrachtDetail AS LeerlingOpdrachtDetail_1 WHERE (leerlingID = @llnid) AND (OpdrachtDetail.opdrachtID = @opID)))">
                        <SelectParameters>
                            <asp:QueryStringParameter DefaultValue="-1" Name="opID" QueryStringField="id" />
                            <asp:Parameter Name="llnID" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                </td>
                <td class="style6">
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:test %>" 
                        
                        SelectCommand="SELECT TOP (1) oplossingTekst, opdrachtDetailID FROM OpdrachtDetail WHERE (opdrachtID = @opID) AND (opdrachtDetailID NOT IN (SELECT opdrachtDetailID FROM LeerlingOpdrachtDetail AS LeerlingOpdrachtDetail_1 WHERE (leerlingID = @llnid) AND (OpdrachtDetail.opdrachtID = @opID)))">
                        <SelectParameters>
                            <asp:QueryStringParameter Name="opID" QueryStringField="id" />
                            <asp:Parameter Name="llnID" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                </td>
                <td>
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                        DataSourceID="SqlDataSource2" Visible="False" 
                        DataKeyNames="opdrachtDetailID">
                        <Columns>
                            <asp:BoundField DataField="oplossingTekst" HeaderText="oplossingTekst" 
                                SortExpression="oplossingTekst" />
                            <asp:BoundField DataField="opdrachtDetailID" HeaderText="opdrachtDetailID" 
                                InsertVisible="False" ReadOnly="True" SortExpression="opdrachtDetailID" />
                        </Columns>
                    </asp:GridView>
                    </td>
            </tr>
        </table>
&nbsp;
	
	    </asp:Content>
<asp:Content ID="Content2" runat="server" contentplaceholderid="head">

    <style type="text/css">
        .style1
        {
            width: 351px;
        }
        .style2
        {
            width: 450px;
            height: 19px;
        }
        .style3
        {
            height: 19px;
        }
        .style4
        {
            width: 351px;
            height: 19px;
        }
        #Text1
        {
            width: 39px;
        }
        #afteller
        {
            width: 26px;
        }
        .style5
        {
            height: 19px;
            width: 238px;
        }
        .style6
        {
            width: 238px;
        }
    </style>

</asp:Content>
